<include file="Index/header" />

<div class="container">
	<nav class="navbar navbar-default" role="navigation">
		<!-- 这里是订单查询 -->
		<ul class="nav navbar-nav">
			<li>
				<a href="?m=admin&c=order&a=showList" class="glyphicon glyphicon-arrow-right">返 回</a>
			</li>
		</ul>
		<form class="navbar-form navbar-right" action="?m=admin&c=order&a=query" method="post"
			class="navbar-form navbar-left" role="search" onsubmit="return query()">
			<div class="form-group">
				<input type="text" class="form-control" name="order_id" id="name" placeholder="订单编号" />
			</div> <button type="submit" class="btn btn-default">搜索</button>
		</form>
	</nav>

	<table class="table table-hover table-bordered">
		<thead>
			<tr>
				<th> 订单编号 </th>
				<th> 分类编号 </th>
				<th> 分类名称 </th>
				<th> 商品名称 </th>
				<th> 订单金额 </th>
				<th> 订单状态 </th>
				<th> 联系电话 </th>
				<th> 收货人 </th>
				<th> 收货地址 </th>
				<th> 下单时间 </th>
				<th> 操作 </th>
			</tr>
		</thead>
		<tbody>
			<foreach name="orderInfo" item="value">
				<tr>
					<td> {$value.order_id} </td>
					<td> {$value['category_id']} </td>
					<td>{$value.category_name} </td>
					<td>{$value['goods_name']} </td>
					<td> {$value.order_money} </td>
					<td> <span class="label label-default">{$value.shipping_status}</span> </td>
					<td> {$value.shipping_phone}</td>
					<td> {$value.shipping_user} </td>
					<td> {$value.shipping_adress} </td>
					<td> {$value.pay_time} </td>
					<td>
						<neq name="value.shipping_status" value="已收货">
							<a href="?m=admin&c=order&a=update&oi={$value.order_id}"
								class="btn btn btn-warning ">更改状态</a>
							<else />
							<a href="#" class="btn btn btn-default disabled">已收货</a>
						</neq>
						<a href="?m=admin&c=order&a=passPort" class="btn btn-sm btn-default ">物流</a>
						<a href="?m=admin&c=order&a=deleteOrder&oi={$value.order_id}" class="btn btn-sm btn-danger"
							onclick="return move()">删除订单</a>
					</td>
				</tr>
			</foreach>
		</tbody>
	</table>
</div>

<br />
<br />

<script type="text/javascript">

	function move() {
		if (window.confirm("是否删除该订单！")) {
			return true;
		}
		return false;
	}
</script>
<include file="Index/footer" />